#include "PAP_defs.h"
#include "derivative.h"

#define IIC_BAUDRATE_100KBPS 0x80
#define IIC_MODULE_ENABLED 1
#define IIC_MODULE_DISABLED 0
#define IIC_INTERRUPTS_ENABLED 1
#define IIC_INTERRUPTS_DISABLED 0
#define IIC_TX_ACK_ENABLED 0
#define IIC_TX_ACK_DISABLED 1
#define IIC_MODE_MASTER 1
#define IIC_MODE_SLAVE 0
#define IIC_TRANSMIT 1
#define IIC_RECEIVE 0

void vfnIIC_SetAddress(uint8 u8address);

void vfnIIC_BaudRate(uint8 u8rate);

void vfnIIC_ModuleStatus(uint8 u8status);

void vfnIIC_InterruptStatus(uint8 u8status);

void vfnIIC_ModeSelect(uint8 u8mode);

void vfnIIC_Restart(void);

void vfnIIC_TxAcknowledgeStatus(uint8 u8status);

void vfnIIC_DataDirection(uint8 u8mode);

uint8 u8IIC_TransferComplete(void);

uint8 u8IIC_CheckIfAdressed(void);

uint8 u8IIC_BusBusy(void);

uint8 u8IIC_CheckArbitrationLost(void);

uint8 u8IIC_SlaveStatus(void);

uint8 u8IIC_CheckInterrupt(void);

uint8 u8IIC_AckReceived(void);

uint8 u8IIC_ReadData(void);

void vfnIIC_SendData(uint8 u8data);

void vfnIIC_ClearInterruptFlag(void);

uint8 u8IIC_MasterMode(void);

uint8 u8IIC_TransmitMode(void);

uint8 u8IIC_ArbitrationLost(void);

void vfnIIC_ClearArbitrationLost(void);

